#include "dsquare.h"
#include<stdio.h>


//Programmer: Nguyen Xuan Hoai
//Function: Draw a square on the screen using asterisk characters
//Input: the side of the square
//Exception Handling: none
//Algorithms: Loop with the boundary locations filled with asterisks

void DrawSquare(unsigned a)
{
	int i,j;
	for(i=1;i<=a;i++)
	{
	 for(j=1;j<=a;j++)
      if ((i==1)||(i==a)||(j==1)||(j==a))
		  printf("*");
	  else
		  printf(" ");
     printf("\n"); 
	}

 
}
//Programmer: Nguyen Xuan Hoai
//Function: Draw a rectangle on the screen using asterisk characters
//Input: the sides of the rectangle
//Exception Handling: none
//Algorithms: Loop with the boundary locations filled with asterisks

void DrawRectangle(unsigned a,unsigned b)
{
	int i,j;
	for(i=1;i<=a;i++)
	{
	 for(j=1;j<=b;j++)
      if ((i==1)||(i==a)||(j==1)||(j==b))
		  printf("*");
	  else
		  printf(" ");
     printf("\n"); 
	}

 
}
